#ifndef _DATASTRUCT_H
#define _DATASTRUCT_H

#include <QString>
#include <QFile>
#include <QTextStream>

#define NOERROR 1
#define UNDERTAKE 0
#define ERROR -1

#define LOCALCONTOLLER 1
#define REMOTEHMI 2

enum class ENUM_RFswStage {Init, Insert, Delay, Welding, Finish};

typedef struct RobotDAQData{
    double  RobotJointData[6];
    double  RobotJointTorData[6];
    double  RobotTTSOffsetData[6];
    double  RobotOvnData;
    bool    RobotVarBoolData[8];
    double  RoborVarValueData[8];
}ST_RobotDAQData;

typedef struct RobotAdjData{
    double toRobotOvn;
    double toRobotPosTTSData_rela[3];
    double toRobotPosTTSData_abs[3];
}ST_RobotAdjData;

typedef struct FswTecDAQData{
    short   RFSWStage;
    bool    InitPosDone;
    bool    EndPosDone;
    int     InitPosDelayTime;
    double  SpindleSpeedReal;
    double  ForceInitPosSet;
    double  ForceProcessSet;
    double  ForceSensorReal;
    double  ForceAdjGlobalCoefficient;
    double  PointLaserValue;
}ST_FswTecDAQData;

typedef struct FswTecAdjData{
    double  RobotOvn;
    double  RobotPosZOffsetRela;
    double  RobotPosZOffsetAbs;
}ST_FswTecAdjData;

typedef struct DataSaveParam{
    QFile *mSaveFile;
    QTextStream *mStreamData;
    bool SaveFlagLast;
    double TimeOrder;
    double TimeOrderLast;
    double TimeOrderNow;
}ST_DataSaveParam;

#endif // _DATASTRUCT_H
